﻿@model Rostfritt.Core.Entities.Company

@{
    ViewBag.Title = "Företag - " + Model.CompanyName;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Företag - @Model.CompanyName</h2>

<table>
    <tr>
        <th>
            Företagsnummer:
        </th>
        <th colspan="3">
            
        </th>
    </tr>
    <tr>
        <td>
            @Model.CompanyId
        </td>
        <td>
            @Html.ActionLink("Ändra", "Edit", new { id = Model.CompanyId })
        </td>
        <td colspan="2">
            @Html.ActionLink("Ta bort", "Delete", new { id = Model.CompanyId })
        </td>
    </tr>
    <tr>
        <th>
            Adress:
        </th>
        <th>
            Stad:
        </th>
        <th>
            Postnummer:
        </th>
        <th>
            Land:
        </th>
    </tr>
    <tr>
        <td>
            @Model.Address
        </td>
        <td>
            @Model.City
        </td>
        <td>
            @Model.ZipCode
        </td>
        <td>
            @Model.Country
        </td>
    </tr>
</table>

<h3>Anställda</h3>

<table>
    <tr>
        <th>
            Namn:
        </th>
        <th>
            Telefon:
        </th>
        <th>
            Mobil:
        </th>
        <th>
            Epost:
        </th>
    </tr>
    
    @foreach (var m in Model.Emploies)
    {
        <tr>
            <td>
                @Html.ActionLink(m.Firstname + m.Lastname, "Details", "Contact", new { id = m.EmployerId })
            </td>
            <td>
                @Html.DisplayFor(model => m.Phone)
            </td>
            <td>
                @Html.DisplayFor(model => m.CellPhone)
            </td>
            <td>
                @Html.DisplayFor(model => m.Email)
            </td>
        </tr>
    }
</table>
